﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QC
{
    public interface IMeasurements
    {
        //displays list of orders that need measurements taken based on the current day/time
        DataTable ListofMaterialsScheduled();

        //information for required measurement screen for tester
        //use material id from Orders table to get spec measurements from Measurements table
        DataTable DisplayRequiredMeasurements(int materialID);

        //get measurement information from tester entered into screen
        //will need more than one parameter, how many?
        string GetMeasurementsTaken(decimal measurement, int orderID, int materialattribID, int materialID);

        //calculate the difference between the measurements taken and specs
        //returns difference to form , return boolean pass/fail
        bool CalculateMeasurementdifference(decimal measurement, int materialattribID, int materialID);

        //send measurements to measurement database, 
        //include differences and specs at time of measurement
        //paramaters should be all columns in measurement table
        //returns string with success (db updated)or with error message (try catch)
        //send date, string to logging method

        string SaveMeasurementstoDB 
            (int orderid, int matid, int measureattbid, decimal value, DateTime date, int empid, int shift, int crew, bool pf, bool ot, string delayed);
    }
}
